package com.ysm.smfu.food;

import android.content.Intent;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.ysm.smfu.R;
import com.ysm.smfu.activity.BaseActivity;
import com.ysm.smfu.view.NumberAddSubView;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by Administrator on 2017/4/10.
 * 提交订单
 */
public class SubmitOrderActivity extends BaseActivity {

    @BindView(R.id.back)
    ImageView back;
    @BindView(R.id.title)
    TextView title;
    @BindView(R.id.food_title)
    TextView foodTitle;
    @BindView(R.id.price)
    TextView price;
    @BindView(R.id.numberAddSubView)
    NumberAddSubView numberAddSubView;
    @BindView(R.id.total_price)
    TextView totalPrice;
    @BindView(R.id.title_total_price)
    TextView titleTotalPrice;
    @BindView(R.id.all_total_price)
    TextView allTotalPrice;
    @BindView(R.id.phone_Num)
    TextView phone_Num;
    @BindView(R.id.title_phoneNumFun)
    TextView titlePhoneNumFun;
    @BindView(R.id.phoneNum)
    TextView phoneNum;
    @BindView(R.id.bindPhoneNum)
    TextView bindPhoneNum;
    @BindView(R.id.submit)
    TextView submit;

    @Override
    protected void initViews() {
        super.initViews();
        setContentView(R.layout.activity_submit_order);
        ButterKnife.bind(this);
        title.setText("提交订单");
        numberAddSubView.setOnButtonClickListenter(new NumberAddSubView.OnButtonClickListenter() {
            @Override
            public void onButtonAddClick(View view, int value) {
            }

            @Override
            public void onButtonSubClick(View view, int value) {
            }
        });
    }

    @OnClick({R.id.back, R.id.submit})
    public void onclick(View view) {
        switch (view.getId()) {
            case R.id.back:
                finish();
                break;
            case R.id.submit:
                submit();
                break;
        }
    }

    /**
     * 提交订单
     */
    private void submit() {
        Intent intent = new Intent(this, ZhiFuFoodActivity.class);
        intent.putExtra("foodPrice", 198);
        intent.putExtra("foodTitle", "伊塔牛排双人套餐");
        intent.putExtra("foodUrl", "");
        startActivity(intent);
    }
}
